/*
 *
 * Copyright (C) 2012 Walter Lütgenau
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package offset.nodes.client.editor.model.messages;

import java.io.Serializable;
import offset.nodes.client.virtual.model.jcr.nodetype.NodeTypeDefinition;
import offset.nodes.client.virtual.model.jcr.nodetype.PropertyDefinition;

/**
 *
 * @author Walter Lütgenau
 */
public class TemplateInformation implements Serializable {

    NodeTypeDefinition nodeTypeDefinition = null;
    PropertyDefinition propertyDefinition = null;
    String elementPath;
    boolean multiple = false;

    public TemplateInformation(String elementPath, NodeTypeDefinition nodeTypeDefinition, boolean multiple) {
        this.elementPath = elementPath;
        this.nodeTypeDefinition = nodeTypeDefinition;
        this.multiple = multiple;
    }

    public TemplateInformation(String elementPath, PropertyDefinition propertyDefinition, boolean multiple) {
        this.elementPath = elementPath;
        this.propertyDefinition = propertyDefinition;
        this.multiple = multiple;
    }

    @Override
    public Object clone() {
        return new TemplateInformation(elementPath, propertyDefinition, multiple);
    }

    public NodeTypeDefinition getNodeTypeDefinition() {
        return nodeTypeDefinition;
    }

    public PropertyDefinition getPropertyDefinition() {
        return propertyDefinition;
    }

    public String getElementPath() {
        return elementPath;
    }

    public boolean isMultiple() {
        return multiple;
    }
}
